import React, { useMemo } from 'react';
import './index.scss';

interface HelloProps {
    title: string;
}

export const Hello: React.FC<HelloProps> = (props: HelloProps) => {
    const { title } = props;

    return useMemo(() => {
        return (
            <div className={['hello-container'].join(' ')}>
                <span className="hello-text">{title}</span>
            </div>
        );
    }, [title]);
};

Hello.defaultProps = {
    title: '默认title',
};
